PDPbox | python partial dependence plot toolbox | Code Editor library
kandi X-RAY | PDPbox Summary
kandi X-RAY | PDPbox Summary
python partial dependence plot toolbox.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PDPbox
PDPbox Key Features
PDPbox Examples and Code Snippets
import lightgbm as lgb
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from pdpbox import pdp, get_dataset, info_plots
#load some data
df = sns.load_dataset("iris")
X =
Community Discussions
Trending Discussions on PDPbox
QUESTION
I'm trying to plot the Partial Dependence and ICE plots for a Multi-layer perceptron classifier. I'm using the UCI Adult dataset. I have Label Encoded the categorical features and Scaled the overall dataframe and then performed a test-train split on the scaled dataframe.
Now when I'm trying to plot the PDP and ICE plots I get the Age values (column in the X Axis of the plot) as scaled and hence not comprehend-able. I want the age values to be the original values before scaling was performed on the data. How can I achieve this?
This is the code for the plots:
...ANSWER
Answered 2020-Sep-04 at 05:35I was able to solve the above problem by using a Pipeline object. I used one hot encoding for the categorical variables and then pushed the scaling and the classifier operations into the Pipeline object. I was then able to use the encoded X_train without any issues for the partial dependence plot and I got the actual Age value ranges, what I was looking for.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PDPbox
through pip (latest stable version: 0.2.1) $ pip install pdpbox
through git (latest develop version) $ git clone https://github.com/SauceCat/PDPbox.git $ cd PDPbox $ python setup.py install
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page